<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    /**
     * 幻灯片
     */
    public function getbanner(){

        $list=Db::name('banner')->order('weigh desc')->select();

        foreach ($list as &$key){
            $key['image']=cdnurl($key['image'],true);
        }

        $this->success('请求成功',$list);

    }

}
